package com.luotao.test.common;

import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: luotao
 * Date: 12-5-13
 * Time: 上午11:07
 * To change this template use File | Settings | File Templates.
 */
public class Param {

    private static void nextDateUpdate(Date arg){

        arg.setDate(arg.getDate()+1);
        System.out.println("arg in nextday= " + arg);
    }

    private static void nextDateReplace(Date arg){
        arg = new Date(arg.getYear(),arg.getMonth(),arg.getDate()+1);
        System.out.println("arg in replace : "+arg);
    }

    public static void main(String[] args) {
        Date d1 = new Date("1 Apr 98");
       // System.out.println("d1 = " + d1);
        nextDateUpdate(d1);
        System.out.println("d1 = " + d1);
        Date d2 = new Date("1 Apr 98");
        nextDateReplace(d2);
        System.out.println("d2 = " + d2);
    }
}
